Copyright: Copyright 1999-2000, TAL Technologies, Inc.


Index
TCP/Com

TCP/Com is a RS232 to TCP/IP converter. It allows any of the serial (RS232) ports on your PC to interface directly to a TCP/IP network. This makes it possible for any other computer on the same network to access the serial ports on the PC through a TCP/IP communications program.

For example, you could connect a serial device (bar code reader, electronic balance or electronic measuring instrument) to a COM port on your PC, run TCP/Com and then connect to the device from any other PC on your network through a TCP/IP socket connection. This would allow you to use TCPWedge from TAL Technologies, Inc., HyperTerminal or the Telnet programs that come with Windows or any other TCP/IP communications software to read or write to the serial device directly from any other PC located on the same network. TCP/Com can also be used to pass serial data across a corporate intranet or over the Internet.

Note: TCP/Com is not a device driver that makes a TCP/IP port look like a local serial port on your PC. You can however use TCP/Com to accomplish this functionality if you have two available serial ports on your PC and a short Null Modem serial cable.

See Also:

Common Applications for TCP/Com

Configuring TCP/Com

Saving and loading configurations for TCP/Com


Common Applications for TCP/Com

TCP/Com can be used to solve a variety serial and TCP/IP problems. Listed below are some typical uses for TCP/Com.

1. Using a network or the Internet as a giant serial cable.

Run TCP/Com as a server on one PC in a network and then run a second copy of it as a client on another PC connecting back to the first copy. Any data that goes in the serial port on the server end will go out the serial port on the client PC and vice versa. To make this simple and painless, TCP/Com comes with a two user license so you can legally install it on two PCs for just this purpose.

Note: When TCP/Com is configured as a server, it can accept connections from multiple clients. This allows you to send data from a device connected to the serial port on the server end to more than one client PC.

2. Send or receive data over a TCP/IP port with a serial communications program.

Suppose you have a pre-written software package that communicates through a serial port and you want to send or receive data using that program across a TCP/IP port. You can accomplish this using two serial ports on your PC and connecting them to each other with a short Null Modem cable. You would then run TCP/Com on one serial port and your other serial communications program on the other serial port. When your serial communications program transmits data out its serial port, it would immediately go into the second serial port (on the same PC) into TCP/Com which would then send the data out over the TCP/IP port.

3. Emulating a multi port terminal server.

A terminal server is a device that connects a serial instrument (balance, bar code scanner, PLC, serial terminal, etc.) to a network and provides an I/O path to the device through a TCP/IP port. TCP/Com performs the same function as a terminal server except it runs on a PC with a network adapter and one or more serial ports. You can configure TCP/Com for up to 16 serial ports at a time and associate each serial port to a different TCP/IP port either as a TCP/IP client or as a server. A hardware terminal server typically costs about $500 and provides only a single serial port. If you had 16 serial devices that you wanted to connect to a network, it would cost around $8000 for 16 terminal servers to do the job. You can purchase a new Windows PC for around $700. A network adapter can be had for under $20 and a 16 port serial adapter can be purchased for around $500. For less than $1500, you can make your own 16 port terminal server using TCP/Com. Because TCP/Com can do its job in the background, you still have a PC that you can use for other tasks. Most terminal servers also only support a single TCP/IP connection at a time therefore TCP/Com has the added advantage that it will allow you to connect multiple clients to a single serial device.

See Also:

Configuring TCP/Com


Configuring TCPCom
Configuring TCP/Com:

When you run TCP/Com, the following window will appear:

TCP/Com can be configured for as many as 16 serial ports at a time on a single PC. The program uses a multi-document user interface therefore to map more than one serial port to a TCP/IP connection you would select "New" from the File menu to open up a new converter window.

Each converter window has a set of serial I/O parameters in the left side of the window and a set of TCP/IP parameters in the right side.

To configure a connection, choose the COM port and the desired serial communications parameters and then specify the IP address and port number that you want to connect to and lastly, click the Activate button to establish the connection.

Each converter window (i.e. COM port) in TCP/Com can act as either a TCP/IP client or a server. If you configure a COM port to act as a TCP/IP client, then you will need to specify the remote host IP address and the port number for the TCP/IP server that you want to connect to. If you configure a COM port to act as a TCP/IP server, then the IP address of the local PC will be used and you only need to specify the port number that you would like to use. If your PC has more than one network interface card (NIC) then TCP/Com will display a list of all the IP addresses for each NIC installed in your system so that you can select the IP Address that you want to use.

After you enter the parameters that you would like to use, you must click the button marked "Activate" to establish a connection between the serial port and the TCP/IP port. If the current window is set up as a client, it will immediately try to establish a connection to the specified remote server. If the server is not available, TCP/Com will continually try to establish the connection until it is successful. If the window is set up as a server, it will wait in "Listen Mode" until a client establishes a connection to it.

TCP/Com supports multiple connections when it is configured as a server. This allows as many clients as you like to connect to TCP/Com. When configured as a server, the default settings are that all data received through the serial port on your PC will be sent to each of the clients connected to TCP/Com and all data received from each of the connected clients will be transmitted out the serial port on your PC. You can control the flow of data to and from each of the connected clients by clicking the button marked "I/O Options".

In order for TCP/Com to act as a server, the PC that it is running on must have at least one network interface card with an IP address assigned to it. In Microsoft Windows, the TCP/IP protocol can be configured to automatically obtain an IP address from a host computer. This means that your PC may not have an IP address until it is connected to a network server or a host computer. You may need to contact your network administrator to assign an IP address to your PC if you wish to configure a COM port using a TCP/IP server connection. This is done in the network settings for the TCP/IP protocol in your control panel.

The IP address that you specify in TCP/Com when configuring it as a client may also be either a URL or the name of a computer located on your network. For example, if you want to connect to a computer named "Bob's PC", you can simply enter "Bob's PC" for the IP address instead of the actual IP address. If you are configuring TCP/Com as a client and your network is set up to assign IP addresses dynamically to each individual workstation, then you may need to use the name of the PC that you want to connect to instead of an actual IP address in order to guarantee a connection.

Notes:

Selecting the "Wait for timeout before transmit" option in the Serial Port setting instructs TCP/Com to not transfer any incoming serial data to the specified TCP/IP port until either 2000 characters have been received OR until no more data has been received through the serial port after a specific timeout period that you specify in the "Timeout Value" option. Selecting this option can help to speed up transfers of large amounts of data received through the serial port at high rates of speed. The default Timeout Value of 150ms should be an adequate value for most typical applications.

When you minimize TCP/Com, it will insert an icon into the Windows system tray instead of placing an icon in the Windows taskbar. To open the TCP/Com window after it has been minimized, right click on the TCP/Com icon in the system tray and select "Open TCP/Com" from the popup menu that appears.

See Also:

TCP/IP Client and Server Options


TCP/IP Client and Server Options

When you configure TCP/Com as either a TCP/IP client or a server, you can control how bi-directional data is handled. In the TCP/IP settings section of each session window, there is a button with the caption "I/O Options" that will open an options dialog box.

Server Options:

When TCP/Com is configured as a TCP/IP Server, clicking the "I/O Options" button will present the following dialog box:

As a server, TCP/Com can accept multiple connections to a TCP/IP port from any number of clients. You can disable this functionality and only accept a single client connection by clearing the check box marked "Allow multiple client connections". You can also control how bi-directional data is handled from each connected client using the "Inbound TCP/IP data options" and the "Inbound serial data options". The meaning of each option is described below:

Inbound TCP/IP data options:

1. Transmit inbound TCP/IP data from all clients out the serial port.

This option instructs TCP/Com to accept incoming data from all connected TCP/IP clients and thus send all data received out the serial port. Data received from all clients is transmitted out the serial port as it is received.

2. Ignore inbound TCP/IP data from all clients.

This options instructs TCP/Com to discard all data received from all connected clients. This effectively turns TCP/Com into a one way communications program. This option should be selected when you want to allow all connected clients to be able to receive data that is sent by a device into the servers serial port however you do not want any of the clients to be able to send anything out the serial port back to the serial device.

3. Transmit inbound data from first connected client only.

This option instructs TCP/Com to allow only the first connected client to have the ability to transmit data out the serial port. Any clients that establish a connection to TCP/Com after the first client connects will only be able to see incoming serial data and will not be able to send any data out the serial port.

Inbound serial data options:

1. Send inbound serial data to all TCP/IP clients.

This option instructs TCP/Com to send incoming serial data to all connected TCP/IP clients.

2. Ignore inbound serial data.

This options instructs TCP/Com to discard all data received through the serial port. This option should be selected only when you want to allow all connected clients to be able to transmit data out the servers serial port to a device however you do not want any of the clients to be able to receive any data back from the serial device.

3. Send inbound serial data to first connected client only.

This option instructs TCP/Com to allow only the first connected client to have the ability to receive data from the serial port. Any clients that establish a connection to TCP/Com after the first client connects will only be able to send data out the serial port.

Client Options:

When TCP/Com is configured as a TCP/IP Client, clicking the "I/O Options" button will present the following dialog box:

As a client, TCP/Com establishes a connection to a TCP/IP server. Normally any data received through the TCP/IP port that it connects to is transmitted out the serial port and any data received through the serial port is sent back to the TCP/IP server. You can choose to enable or disable full 2-way communications using the following options:

1. Allow complete 2-way I/O.

This option enables fully bi-directional communications.

2. Disable output to serial port.

Selecting this option causes TCP/Com to discard all data received from the TCP/IP server that it is connected to and thus not send any data out the serial port.

3. Disable output to TCP/IP port.

Selecting this option causes TCP/Com to discard all data received through the serial port and therefore not send any serial data to the TCP/IP server.

See Also:

Configuring TCP/Com


Saving and Loading Configurations
Saving and loading configurations for TCP/Com:

TCP/Com allows you to save and load configuration files using the Save and Open options in it's File menu. It will also remember the currently active settings that are in effect when you quit the program in a file named Default.T2C. For example, suppose that you configure two COM ports in TCP/Com and activate them both and then select Exit from the File menu (with both ports still active). The next time that you run TCP/Com, it will automatically retrieve the settings that were in effect when you last quit the program and it will even automatically activate the connections for both ports. In fact, TCP/Com will even remember if its window was minimized when it was last shut down and automatically minimize itself again.

In many situations, you may want to add a shortcut for TCP/Com to your Startup folder so that it runs automatically when you turn on your PC. Because TCP/Com automatically remembers how it was configured the last time that it was run, you do not need to have an operator present to open a previously saved configuration or activate any of the connections. All of this is handled automatically by TCP/Com when if loads into memory.

Notes:

TCP/Com registers the file name extension .T2C with the operating system so that you can open up a specific configuration file that has been saved with the extension .T2C by clicking on its file name in the Windows Explorer.

When you minimize TCP/Com, it will insert an icon into the Windows system tray instead of placing an icon in the Windows taskbar. To open the TCP/Com window after it has been minimized, right click on the TCP/Com icon in the system tray and select "Open TCP/Com" from the popup menu that appears.